The present invention relates generally to network computing and, in particular to socket level control of input message priority.
Given a computer acting as a server for a number of network applications with a volume of inbound Transmission Control Protocol/Internet Protocol (TCP/IP) message traffic that is sufficiently high to cause system resources to be constrained, to what degree can the applications control message priority? Many existing systems provide a means for predefining one application's priority over another, however these systems do not allow for dynamic control by the application itself on a socket-by-socket basis. There is a need for dynamic control by the application on a socket-by-socket basis.
Conventionally, in a TCP/IP network when resources are constrained, messages, such as packets, are discarded by IP routers to free up resources without regard to the priority of a connection or the application using it. Some existing services allow packets for different applications to flow at different priorities within the network. However the priority value is assigned by the sending node and is primarily used for routing the packet through the network. There is a need for a way to have the receiving server control how the priority value is assigned to packets.
Priority values set by clients sending data to a server may not be aligned with the goals of the server in processing messages. Many existing servers run a single application or have multiple classes of users connected to the same application. Defining priority values at the application level does not work in these environments. There is a need for a way to define priority at different levels.
Traffic for multiple applications or different users on the same application can all flow over the same network adapter on the server. When resources in the server become constrained, typically, the server goes into shutdown mode and stops reading from the network adapter, which causes the network to discard all packets destined for the server. In some cases, resources are held by the server application, which is waiting for a response from the network. These resources cannot be freed up until the response from the network is received. This can result in a deadlock condition where the server is in shutdown, the only way to get out of shutdown is for the server application to free its resources, but this cannot happen because the network response cannot be received in shutdown mode. There is a need for a way to manage server resources to avoid this deadlock condition.
FIG. 1 shows an exemplary prior art environment. A server 100 communicates with clients 102 over an IP network 104. The server 100 has a first application 106 and a second application 108 in communication with a TCP/IP stack 110. The TCP/IP stack 110 is a general term for the specific TCP/IP implementation of an operating system (e.g., a stack may have an application layer, a transport layer, an internet layer, and a network interface layer). The TCP/IP stack 110 is in communication with network interfaces 112, which connect the server 100 to the IP network 104. FIG. 1 shows a master-slave relationship, but peer-to-peer or any relationship using an IP network is similar.
FIG. 2 shows packets flowing from storage in the network interfaces 112 to applications 106, 108 in the prior art. Inbound packets 200 arrive from IP network 104 and are placed in buffers 202 associated with the network interfaces 112. Packets 200 are moved from the buffers 202 to storage 204 in the TCP/IP stack 110. Storage 204 includes TCP/IP stack packet buffers and other storage mechanisms, such as queues. Slots in the storage 204 are freed when data is read by a read( ) instruction 206 in an application 106, 108. Without priority processing, when there is no space in the buffers to accept a packet, it is discarded.